using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.IO;
using System.Text;

using ExchangeHog.Pop3Client.Responses;

namespace ExchangeHog.Pop3Client.Commands
{
    internal sealed class PassCommand : Pop3Command<Pop3Response>
    {
        private string _password;
        public PassCommand(Stream stream, string password): base(stream, false, Pop3State.Authorization)
        {
            if (string.IsNullOrEmpty(password))
                throw new ArgumentNullException("password");
            _password = password;
        }

		protected override byte[] CreateRequestMessage()
        {
            return GetRequestMessage(Pop3Commands.Pass, _password, Pop3Commands.Crlf);
        }
    }
}
